﻿using System;
using System.Collections.Generic;
using EraNet.Core;
using EraNet.Core.Model.Drivings;
using EraNet.Core.Model.Account;

namespace EraNet.Services.Drivings
{
    public partial interface IDriveSchoolService
    {
        #region
        /// <summary>
        /// 
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int InsertSchool(DrivingSchool model);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int UpdateSchool(DrivingSchool model);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="provinceMark"></param>
        /// <param name="cityMark"></param>
        /// <param name="index"></param>
        /// <param name="pagesize"></param>
        /// <param name="showHidden"></param>
        /// <returns></returns>
        IPagedList<DrivingSchool> GetSchool(string provinceMark, string cityMark, int index, int pagesize, bool showHidden = false);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="schoolId"></param>
        /// <returns></returns>
        int DeleteSchool(int schoolId);
        #endregion

        #region 雇员
        /// <summary>
        /// 
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int InsertEmployee(Employee model);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="employeeId"></param>
        /// <returns></returns>
        int UpdateEmployee(Employee model);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="employeeId"></param>
        /// <returns></returns>
        int DeleteEmployee(int employeeId);
        /// <summary>
        ///  用户登录
        /// </summary>
        /// <param name="employeeAccount"></param>
        /// <param name="employeePwd"></param>
        /// <returns></returns>
        Employee EmployeeLogin(string employeeAccount, string employeePwd);
        /// <summary>
        /// 获取驾校实体
        /// </summary>
        /// <returns></returns>
        Employee GetLoginClient();


        System.Collections.Generic.List<DrivingSchool> GetAllSchool();

        List<DrivingSchool> GetSchoolByIp();
        /// <summary>
        /// 驾校登录
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="Password"></param>
        /// <returns>0-〉登陆失败  5.登陆成功  6->用户名不存在 7-〉用户密码错误 8->用户名为空或者格式错误  9->密码为空或者格式错误 10-〉用户被锁定或者过期</returns>
        Employee GetEmployee(string accountName, string password, out int result);

         /// <summary>
        /// 根据用户名获取用户
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        Employee GetDrivSchoolByName(string accountName);
        

        DrivingSchool GetSchoolById(int schoolId);
        
        
        #endregion

        #region 部门

        #endregion
    }
}
